<%--
  Created by IntelliJ IDEA.
  User: 金贤哲
  Date: 2017/2/27 0027
  Time: 16:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
    <title>用户信息</title>
    <meta name="decorator" content="default"/>
    <script src="${ctxStatic}/layer/layer.js"></script>
    <script src="${ctxStatic}/js/widget/stickytableheaders/js/jquery.stickytableheaders.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $(".view_service_record").click(function(){
                var id=$(this).data("id");
                parent.layer.open({
                    type: 2,
                    title: '服务记录',
                    shadeClose: true,
                    shade: 0,
                    area: ['90%', '70%'],
                    content: '${ctx}/sys/member/member/seviceRecordPage?id='+id //iframe的url
                });
            });
            $("#contentTable").stickyTableHeaders();
        });

        function page(n,s){
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
    </script>


</head>
<body>
<ul class="nav nav-tabs">
    <shiro:hasPermission name="sys:member:member:tel"><li class="active"><a href="${ctx}/sys/member/member/">近期注册用户信息列表</a></li></shiro:hasPermission>>
</ul>

<form:form id="searchForm" modelAttribute="member" action="${ctx}/sys/member/member/tel" method="post" class="breadcrumb form-search">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
    <ul class="ul-form">
        <li><label>周期：</label>
            <select name="day">
                <option value="">=请选择=</option>
                <option value="1" <c:if test="${member.day=='1'}">selected</c:if>>-三天内-</option>
                <option value="2" <c:if test="${member.day=='2'}">selected</c:if>>-一周内-</option>
                <option value="3" <c:if test="${member.day=='3'}">selected</c:if>>-一月内-</option>
            </select>
        </li>
        <li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
        <li class="clearfix"></li>

    </ul>
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead style="top: 0">
    <tr>
        <th style="width: 5%">用户名</th>
        <th style="width: 5%">昵称</th>
        <th style="width: 5%">真实姓名</th>
        <th style="width:5%">商务人员</th>
        <th style="width: 5%">性别</th>
        <th style="width: 5%">出生日期</th>
        <th style="width: 5%">身份证号码</th>
        <shiro:hasPermission name="sys:member:member:sr:view">
            <th style="width: 4%">服务记录</th>
        </shiro:hasPermission>
        <%--<th style="width: 10%">操作</th>--%>
    </tr>
    </thead>
    <tbody >
    <c:forEach items="${page.list}" var="member">
        <tr>
            <td style="width: 5%"><a href="${ctx}/sys/member/member/form?id=${member.id}">
                      ${member.usernameFake} (${fnc:getPhoneAddress(member.username, '86')})
            </a></td>
            <td style="width: 5%">
                    ${member.nickname}
            </td>
            <td style="width: 5%">
                    ${member.realname}
            </td>
            <td style="width: 5%">
                    ${member.managerName}
            </td>
            <td style="width: 5%">
                    ${member.sex}
            </td>
            <td style="width: 5%">
                    ${member.birthdayStr}
            </td>
            <td style="width: 5%">
                    ${member.idCard}
            </td>
                <%--		<td style="width: 5%">
                            <fmt:formatDate value="${member.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
                        </td>
                        <td style="width: 5%">
                            ${member.remarks}
                        </td>--%>
            <shiro:hasPermission name="sys:member:member:sr:view">
                <td style="width: 4%">
                    <a href="#" class="view_service_record" data-id="${member.id}">查看更多</a>
                </td>
            </shiro:hasPermission>
            <%--<td style="width: 10%">--%>
                <%--<shiro:hasPermission name="sys:member:member:edit">	<a href="${ctx}/sys/member/member/form?id=${member.id}">发送 </a></shiro:hasPermission>--%>
            <%--</td>--%>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${page}</div>

</body>
</html>
